#include <QCoreApplication>
#include "dataanalysizerdouble.h"
#include<stdio.h>
#include<stdlib.h>
#include <iostream>
#define random(x) (rand()%x)
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int dataVolume=6;
    int dataLength=2000;
    int maxRecordNumber=81;
    DataAnalysizerDouble* dataAna=new DataAnalysizerDouble("this is test.",0,100,dataVolume ,maxRecordNumber,2);
    std::vector<std::vector<double> > ramData1;
//initial
      std::cout <<std::endl <<"Random data-------------------------\n"<<std::endl ;
    ramData1.resize(dataLength);
    for(int i=0;i<dataLength;i++)
    {
         ramData1[i].resize(dataVolume);
         for(int j=0;j<dataVolume;j++)
         {
             ramData1[i][j]=random(100);
   //           std::cout <<ramData1[i][j]<<" , ";

         }
    //      std::cout <<std::endl ;
    }



// data anaylizer
    for(int i=0;i<2;i++)
    {
        for(int j=0;j<5;j++)
        {

        }

    }
    for(int i=0;i<dataLength;i++)
    {
        dataAna->recordDataForAnalysize(ramData1[i]);

    }


    dataAna->writeDataQueueToFile("hualeidata.csv");
    while(1);
    return a.exec();
}
